package com.shihang.core.apollo.spring;

import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;


@Configuration
@ComponentScan("com.shihang.core.apollo.*")
@Import(ApolloApplicationContextInitializer.class)
@EnableApolloConfig
@EnableConfigurationProperties({ApolloProperties.class})
public class ApolloConfiguration implements InitializingBean {


    private org.slf4j.Logger logger = LoggerFactory.getLogger(ApolloApplicationContextInitializer.class);


    @Override
    public void afterPropertiesSet() {
        logger.info("apollo 已生效!!!");
    }

}
